#!/usr/bin/perl
use LWP;
$ua = LWP::UserAgent->new;
#create request
$myreq = HTTP::Request->new(POST=>"http://itbkhn.com/forum/search.php?do=process");
$myreq->content_type('application/x-www-form-urlencoded');
$myreq->header('Host'=>'itbkhn.com');
$myreq->header('User-Agent'=>'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.4) Gecko/2008111318 Ubuntu/8.10 (intrepid) Firefox/3.0.4');
$myreq->header('Accept'=>'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8');
$myreq->header('Accept-Language'=>'en-us,en;q=0.5');
$myreq->header('Accept-Encoding'=>'gzip,deflate');
$myreq->header('Accept-Charset'=>'ISO-8859-1,utf-8;q=0.7,*;q=0.7');
$myreq->header('Keep-Alive'=>'300');
$myreq->header('Connection'=>'keep-alive');
$myreq->header('Referer'=>'http://itbkhn.com/forum/search.php?do=process');
$myreq->header('Cookie'=>'HIM_on_off=1; HIM_method=0; HIM_ckspell=1; HIM_daucu=1; vbulletin_collapse=; bblastvisit=1228578230; bblastactivity=0; bbuserid=197; bbpassword=fc86a08d6ced73f6d87f19e476cfa029; bbsessionhash=e40f2fefd77a9763d991e1b8f220b459');
$myreq->content('securitytoken=1229051107-62d9802683f889d4f9556e8025b4038cb3ce927d&do=process&query=th%C3%AD+%C3%AD&titleonly=0&starteronly=1&exactname=1&replyless=0&replylimit=0&searchdate=0&beforeafter=after&sortby=lastpost&order=descending&showposts=0&forumchoice%5B%5D=0&childforums=1&dosearch=B%E1%BA%AFt+%C3%90%E1%BA%A7u+Tim&saveprefs=1');
my $res = $ua->request($myreq);
if ($res->is_error( )) { 
	printf " %s\n", $res->status_line; 
} else {
	print $res->content();
}
